/*
 * TsApplication.h
 *
 *  Created on: 2016年4月6日
 *      Author: terry
 */

#ifndef APPLICATION_H_
#define APPLICATION_H_

#include "BasicType.h"
#include "TSingleton.h"
#include "SharedPtr.h"
#include "TDiscreteArray.h"
#include "TsMediaCaster.h"
#include "TsCaster.h"


typedef std::shared_ptr< av::TsMediaCaster >		TsMediaCasterPtr;

typedef comn::DiscreteArray< TsMediaCasterPtr, MAX_CASTER >		TsMediaCasterArray;


class TsApplication
{
public:
	static TsApplication& instance();

public:
	TsApplication();
	virtual ~TsApplication();

	int init();

	void quit();

	int put(TsMediaCasterPtr& caster);

	TsMediaCasterPtr get(int idx);

	TsMediaCasterPtr remove(int idx);

private:
	TsMediaCasterArray	m_casters;

};

#endif /* APPLICATION_H_ */
